package jee.boot.module.oauth2.config;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

/**
 *
 */
public interface UserDetailHandler {
    UserDetails loadUserByUsername(String username) throws UsernameNotFoundException;

    @Deprecated
    default Boolean checkUser(String username){
        return null;
    }
    @Deprecated
    default Integer checkLockNumber(String username){
        return null;
    }
    @Deprecated
    default Boolean resetLockNumber(String username){
        return null;
    }
    @Deprecated
    default  Boolean checkLock(String username){
        return null;
    }
    @Deprecated
    default Boolean checkInit(String username){
        return null;
    }
    @Deprecated
    default Boolean checkVerificationCode(String username){
        return null;
    }
    @Deprecated
    default String getVerCodeRedis(String username){
        return null;
    }
    @Deprecated
    default Boolean updateLastVerDate(String username){
        return null;
    }

    /**
     * 检查用户的密码是否需要更新
     * @param username
     * @return
     */
    @Deprecated
    default Boolean checkEffectivePassword(String username){
        return null;
    }
    @Deprecated
    default Boolean checkIfNeedValidateCode(){
        return null;
    }
    @Deprecated
    default String checkImgCode(String imgCodeKey){
        return null;
    }

}
